package model

import "gorm.io/gorm"

type PublishAccount struct {
	ID            int    `gorm:"column:id;primary_key;AUTO_INCREMENT;comment:ID"`
	OpenID        string `gorm:"column:open_id;type:varchar(255);uniqueIndex;not null;comment:游戏账号"`
	UserID        string `gorm:"column:user_id;type:varchar(255);uniqueIndex;not null;comment:渠道账号"`
	Password      string `gorm:"column:password;type:varchar(255); not null;comment:账号密码"`
	ChannelKey    string `gorm:"column:channel_key;type:varchar(255);index;comment:渠道KEY"`
	Name          string `gorm:"column:name;type:varchar(255);index;comment:姓名"`
	IDCard        string `gorm:"column:id_card;type:varchar(255);index;comment:身份证号"`
	IsAuth        string `gorm:"column:is_auth;type:varchar(4);default:N;comment:实名认证"`
	IsOK          string `gorm:"column:is_ok;type:varchar(4);default:N;comment:是否认证完成"`
	AccountStatus int    `gorm:"column:account_status;type:int(11);default:0;comment:账号状态"`
	IP            string `gorm:"column:ip;type:varchar(255);comment:IP"`
	LoginCount    uint   `gorm:"column:login_count;type:int(11);default:1;comment:登录次数"`
	Other         string `gorm:"column:other;type:varchar(255);comment:其他"`
	gorm.Model
}

func (PublishAccount) TableName() string {
	return "publish_account"
}
